package com.fingard.dsp.bank.directbank.qdcb11;

import com.fingard.dsp.bank.directbank.DirectBase;

import java.io.File;

public class QDCB11Base extends DirectBase {
    protected String getCharset() {
        return getBankConfig().getCharset("GBK");
    }

    protected String getBatSeqNo(String tmpDir) {
        int batSeqNo = -1;
        File refundFileDir = new File(tmpDir);
        if (refundFileDir.exists()) {
            File[] refundFileList = refundFileDir.listFiles();
            if (refundFileList != null) {
                batSeqNo = refundFileList.length + 1;
            } else {
                batSeqNo = 1;
            }
        } else {
            batSeqNo = 1;
        }
        return String.format("%2s", batSeqNo).replace(" ", "0");
    }
}